package com.cqvie.model;

import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "t_user")  
public class User {
	  	@Id
	    String OID;  
	    /** 用户名 **/  
	    String username;  
	    /** 密码 **/  
	    String password;  
	    /** 是否删除 **/  
	    Integer isDelete;  
	    /** 创建时间 **/  
	    Date createDate;  
//	    
//	    /**班级**/
//	    Classes classes;
//	    
	    
	    
	    
	    public String getOID() {
			return OID;
		}
		public void setOID(String oID) {
			OID = oID;
		}
//		public Classes getClasses() {
//			return classes;
//		}
//		public void setClasses(Classes classes) {
//			this.classes = classes;
//		}
		//多对多用户权限表  
	    @OneToMany(mappedBy = "user",cascade=CascadeType.ALL)  
	    List<UserRole> userRoles;
	    
		public String getId() {
			return OID;
		}
		public void setId(String id) {
			this.OID = id;
		}
		public String getUsername() {
			return username;
		}
		public void setUsername(String username) {
			this.username = username;
		}
		public String getPassword() {
			return password;
		}
		public void setPassword(String password) {
			this.password = password;
		}
		public Integer getIsDelete() {
			return isDelete;
		}
		public void setIsDelete(Integer isDelete) {
			this.isDelete = isDelete;
		}
		public Date getCreateDate() {
			return createDate;
		}
		public void setCreateDate(Date createDate) {
			this.createDate = createDate;
		}
		public List<UserRole> getUserRoles() {
			return userRoles;
		}
		public void setUserRoles(List<UserRole> userRoles) {
			this.userRoles = userRoles;
		}
	    
}
